/*
 * Copyright (c) 2017. 深圳一七网络科技. All rights reserved.
 */

package com.fenxiangle.yueding.feature.order.contract;

import com.amap.api.services.core.PoiItem;
import com.fenxiangle.yueding.entity.bo.OrderBo;
import com.fenxiangle.yueding.entity.bo.Page2Bo;
import com.fenxiangle.yueding.entity.bo.PageBo;
import com.fenxiangle.yueding.entity.bo.PayBo;
import com.fenxiangle.yueding.entity.bo.PublishBo;
import com.fenxiangle.yueding.entity.bo.PublishDemandBo;
import com.fenxiangle.yueding.entity.bo.TeamBo;
import com.fenxiangle.yueding.entity.bo.UserImageBo;
import com.suozhang.framework.entity.bo.Result;
import com.suozhang.framework.framework.BasePresenter;
import com.suozhang.framework.framework.BaseView;

import org.json.JSONObject;

import java.util.List;

import io.reactivex.Observable;

/**
 * LIJUWEN
 *
 * @email yiyayiyayaoljw@gmail.com
 * @date 2017/4/11 9:06
 */
public interface OrderContract {

    interface Model {
        Observable<List<PublishDemandBo>> getReceiveList(PageBo publishBo);

        Observable<List<PublishDemandBo>> getOrderList(Page2Bo publishBo);

        Observable<List<PublishDemandBo>> sheetList(PageBo publishBo);

        Observable<String> acceptOrder(OrderBo payBo);

        Observable<String> refuseOrder(OrderBo payBo);

        Observable<UserImageBo> sheet(OrderBo payBo);

        Observable<UserImageBo> cancelSheet(PageBo payBo);

        Observable<PublishBo> txOrder(OrderBo publishBo);//提醒确认

        Observable<String> cancleOrder(OrderBo publishBo);//提醒确认

        Observable<List<TeamBo>> getUserList(PageBo pageBo);

        Observable<String> confrimOrder(OrderBo publishBo);

        Observable<String> appeal(OrderBo publishBo);

        Observable<String> toComment(JSONObject jsonObject);
    }

    interface View extends BaseView {

        void toComments(String s);
        void confirmOrder(String s);

        void showUserListSuccess(List<TeamBo> workBoPageData);

        void showSheetSuccess(UserImageBo workBoPageData);

        void showcancleSheetSuccess(UserImageBo workBoPageData);

        void showPublishListSuccess(List<PublishDemandBo> workBoPageData);

        void showSheetListSuccess(List<PublishDemandBo> workBoPageData);

        void showPublishListError(String error);

        void showPublishListMoreSuccess(List<PublishDemandBo> msg);

        void showPublishListMoreError(String msg);

        void showPublishListEmpty();

        void showAcceptSuccess(String s);

        void showRefuseSuccess(String s);

        void showError(String error);//显示错误消息

        void showConfrimTxSuccess();

        void showAppealTxSuccess(String s);

        void showCancleSuccess();
    }


    interface Presenter extends BasePresenter {//

        void confirmOrder(OrderBo publishBo);

        void appeal(OrderBo publishBo);

        void sheet(String orderId);

        void cancelSheet(String orderId);

        void sheetList(int pageNow,
                       int pageSize);

        void getPublishInviteList(int pageNow,
                                  int pageSize, Integer type);

        void getPublishInviteListMore(int pageNow,
                                      int pageSize, Integer type);

        void getOrderList(int pageNow,
                          int pageSize, String orderStatus);

        void getOrderListMore(int pageNow,
                              int pageSize, String orderStatus);

        void acceptOrder(String orderId);

        void refuseOrder(String orderId);

        void txOrder(String orderId);

        void cancleOrder(String orderId, String type);

        void toComment(JSONObject jsonObject);

        void getUserList(int pageIndex,
                         int pageSize,
                         String userUid, String orderId, int type);

    }
}
